Cytosim  PI
Cytoskeleton Simulator
Matrix2 Class Reference
Inheritance diagram for Matrix2:
MatrixBase< 2 >

Public Member Functions

 Matrix2 ()
 constructor
 
 Matrix2 (MatrixBase< 2 > const &m)
 automatic conversion from MatrixBase<2>
 
real rotationAngle () const
 rotation angle
 
- Public Member Functions inherited from MatrixBase< 2 >
 MatrixBase ()
 The default creator does not initialize.
 
 MatrixBase (real v[SZ][SZ])
 Copy-creator from a C-style array.
 
 MatrixBase (real v[SZ *SZ])
 Copy-creator from a Fortran-style array.
 
virtual ~MatrixBase ()
 The default destructor does nothing.
 
void makeZero ()
 set all components to zero
 
void makeIdentity ()
 set to Identity (ones on the diagonal, zero elsewhere)
 
 operator real * ()
 conversion to a modifiable real array
 
realoperator() (const unsigned ii, const unsigned jj)
 access to modifiable elements of the matrix by (line, column)
 
realoperator[] (const unsigned ii)
 access to modifiable elements by index in the array
 
void getColumn (const unsigned jj, real vec[SZ]) const
 extract column vector at index jj
 
void setColumn (const unsigned jj, const real vec[SZ])
 set column vector at index jj
 
void getLine (const unsigned ii, real vec[SZ]) const
 extract line vector at index ii
 
void setLine (const unsigned ii, const real vec[SZ])
 set line vector at index ii
 
MatrixBase transposed () const
 return the transposed matrix
 
void transpose ()
 transpose this matrix
 
real determinant () const
 return the determinant of the matrix
 
MatrixBase inverted () const
 return the inverse of the matrix
 
void inverse ()
 replace by the inverse
 
real maxNorm () const
 maximum of all fabs(element)
 
void write (std::ostream &os) const
 formatted output
 
real maxDeviationFromRotation () const
 calculate a distance to the subspace of rotations = maxNorm( M'*M - Id )
 
void operator*= (const real a)
 multiply the matrix by the real scalar a
 
void operator/= (const real a)
 divide the matrix by the real scalar a
 
void operator+= (const MatrixBase m)
 add matrix m
 
void operator-= (const MatrixBase m)
 subtract matrix m
 
void vecMul (const real *in, real *out) const
 Vector multiplication: out <- M * in.
 
void vecMul (real *vec) const
 Vector multiplication: vec <- M * vec.
 

Static Public Member Functions

static Matrix2 rotationFromEulerAngles (real a)
 calculate rotation angle and Euler angle of axis
 
static Matrix2 rotationAroundAxis (real dir, real angle)
 a rotation around the given axis
 
static Matrix2 rotationToVector (const Vector2 &vec)
 return a rotation that transforms (1,0,0) into vec ( norm(vec) should be > 0 )
 
static Matrix2 rotationToVector (const Vector2 &vec, Random &)
 return a random rotation that transforms (1,0,0) into vec ( norm(vec) should be > 0 )
 
static Matrix2 randomRotation (Random &)
 a random rotation chosen uniformly
 
- Static Public Member Functions inherited from MatrixBase< 2 >
static MatrixBase one ()
 return identity matrix (ones on the diagonal, zero elsewhere)
 
static MatrixBase zero ()
 return zero matrix
 
static MatrixBase projectionMatrix (const real V[])
 build the projection matrix V * V'
 

Additional Inherited Members

- Public Attributes inherited from MatrixBase< 2 >
real val [SZ *SZ]
 the array of value, column-major